#ifndef _OPENMAXAL_INTERFACE_H_
#define _OPENMAXAL_INTERFACE_H_
#include "windows.h"
#include "OpenMaxAlCtrl.h"


class COpenMaxAlInterface
{
public:
	COpenMaxAlInterface();
	~COpenMaxAlInterface();
public:
	HMODULE m_hVideoInvoke;	

public:
	typedef void(*PFN_INITMEDIARESOURCE)();
	typedef void(*PFN_UNINITMEDIARESOURCE)();
	typedef void(*PFN_CREATEMEDIAPLAYEROBJ)(LPCWSTR filepath, HWND MainVWhnd,HWND SubVWhnd);
	typedef void(*PFN_PLAYFILE)(LPCWSTR filepath, HWND MainVWhnd,HWND SubVWhnd);
	typedef void(*PFN_STOPFILE)();
	typedef void(*PFN_PAUSEFILE)();
	typedef void(*PFN_SETVOLUME)(long volume);
	typedef void(*PFN_SETMUTE)(BOOL bMute);
	typedef void(*PFN_GETDURATION)(XAmillisecond *duration);
	typedef XAresult(*PFN_GETPOSITION)(XAmillisecond *position);
	typedef XAresult(*PFN_SEEK)(XAmillisecond pos);
	typedef void(*PFN_GETVIDEOSIZE)();
	typedef void(*PFN_SETVIDEOFULLSCREEN);
	typedef void(*PFN_SETVIDEOORIGINALSCREEN);

public:
	PFN_INITMEDIARESOURCE		m_iInitMediaResource;
	PFN_UNINITMEDIARESOURCE		m_iUninitMediaResource;
	PFN_CREATEMEDIAPLAYEROBJ	m_iCreateMediaPlayerObj;
	PFN_PLAYFILE				m_iPlayFile;
	PFN_STOPFILE				m_iStopFile;
	PFN_PAUSEFILE				m_iPauseFile;
	PFN_SETVOLUME				m_iSetVolume;
	PFN_SETMUTE					m_iSetMute;
	PFN_GETDURATION				m_iGetDuration;
	PFN_GETPOSITION				m_iGetPosition;
	PFN_SETVIDEOFULLSCREEN		m_iSetVideoFullScreen;
	PFN_SETVIDEOORIGINALSCREEN	m_iSetVideoOriginalScreen;
public:
//	PLAYER_STATE  gPlayerState;

};


extern COpenMaxAlInterface	g_OpenMaxAlInterface;
#endif